//
//  HeadCollectionReusableView.m
//  Beauty
//
//  Created by Snow on 16/9/6.
//  Copyright © 2016年 Snow. All rights reserved.
//

#import "HeadCollectionReusableView.h"
#import "GXMacro.h"
@implementation HeadCollectionReusableView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _label = [[UILabel alloc] init];
        [self addSubview:_label];
        _buttonOfBuy = [UIButton buttonWithType:UIButtonTypeCustom];
        [self addSubview:_buttonOfBuy];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    [_buttonOfBuy mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.mas_left).mas_equalTo(10);
        make.top.mas_equalTo(self.mas_top).mas_equalTo(10);
        make.width.mas_equalTo(20);
        make.height.mas_equalTo(20);
    }];
    [_label mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.mas_top).mas_equalTo(10);
        make.left.mas_equalTo(_buttonOfBuy.mas_right).mas_equalTo(10);
        make.right.mas_equalTo(self.mas_right).mas_equalTo(-10);
        make.height.mas_equalTo(20);
    }];
}
@end
